package com.htiiot.bean;

public class LogBean {
    private int tenantId;
    private int operatorId;//用户id
    private long createTime;
    private String logSource;//日志来源
    private String modular;//模块
    private String moduleFunction;//功能
    private String operateType;//查看详情
    private String referer;//操作来源
    private int success;//是否成功
    private String failureDesc;//失败原因
    private String queryString;//请求参数
    private int responseTimeLength;//响应时长
    private String requestMethod;
    private String url;
    private String ip;

    public int getTenantId() {
        return tenantId;
    }

    public void setTenantId(int tenantId) {
        this.tenantId = tenantId;
    }

    public int getOperatorId() {
        return operatorId;
    }

    public void setOperatorId(int operatorId) {
        this.operatorId = operatorId;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public String getLogSource() {
        return logSource;
    }

    public void setLogSource(String logSource) {
        this.logSource = logSource;
    }

    public String getRequestMethod() {
        return requestMethod;
    }

    public void setRequestMethod(String requestMethod) {
        this.requestMethod = requestMethod;
    }

    public String getModular() {
        return modular;
    }

    public void setModular(String modular) {
        this.modular = modular;
    }

    public String getModuleFunction() {
        return moduleFunction;
    }

    public void setModuleFunction(String moduleFunction) {
        this.moduleFunction = moduleFunction;
    }

    public String getOperateType() {
        return operateType;
    }

    public void setOperateType(String operateType) {
        this.operateType = operateType;
    }

    public String getReferer() {
        return referer;
    }

    public void setReferer(String referer) {
        this.referer = referer;
    }

    public int getSuccess() {
        return success;
    }

    public void setSuccess(int success) {
        this.success = success;
    }

    public String getFailureDesc() {
        return failureDesc;
    }

    public void setFailureDesc(String failureDesc) {
        this.failureDesc = failureDesc;
    }

    public String getQueryString() {
        return queryString;
    }

    public void setQueryString(String queryString) {
        this.queryString = queryString;
    }

    public int getResponseTimeLength() {
        return responseTimeLength;
    }

    public void setResponseTimeLength(int responseTimeLength) {
        this.responseTimeLength = responseTimeLength;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String format() {
        return tenantId+"|"+
                operatorId+"|"+
                ip+"|"+
                url+"|"+
                createTime+"|"+
                logSource+"|"+
                modular+"|"+
                moduleFunction+"|"+
                operateType+"|"+
                referer+"|"+
                success+"|"+
                failureDesc+"|"+
                requestMethod+"|"+
                queryString+"|"+
                responseTimeLength+"\r\n";
    }

    @Override
    public String toString() {
        return "LogBean{" +
                "tenantId='" + tenantId + '\'' +
                ", operatorId=" + operatorId +
                ", createTime=" + createTime +
                ", logSource='" + logSource + '\'' +
                ", modular='" + modular + '\'' +
                ", moduleFunction='" + moduleFunction + '\'' +
                ", operateType='" + operateType + '\'' +
                ", referer='" + referer + '\'' +
                ", success=" + success +
                ", failureDesc='" + failureDesc + '\'' +
                ", queryString='" + queryString + '\'' +
                ", responseTimeLength=" + responseTimeLength +
                ", requestMethod='" + requestMethod + '\'' +
                ", url='" + url + '\'' +
                ", ip='" + ip + '\'' +
                '}';
    }
}
